reset

set xlabel "X Axis"
set ylabel "Y Axis"
set zlabel "Z Axis"

# 读取dimension.txt文件中的数据
data = system("cat dimension.txt")

# 解析数据
x_length = word(data, 1)
y_length = word(data, 2)
z_length = word(data, 3)

# 计算椭球的参数
r1 = x_length / 2
r2 = y_length / 2
r3 = z_length / 2

# 绘制椭球
set parametric
set isosamples 40,20
set urange[-pi:pi]
set vrange[0:pi]
splot r1*cos(u)*sin(v), r2*sin(u)*sin(v), r3*cos(v)